package com.airy.apprepairequipment.socket;


/**
 * @author airy
 * @description: Socket服务端启动类
 * @date 2020/11/19 8:27
 */

import org.springframework.stereotype.Component;

/**
 * Java编写简单的Socket通信应用，实现服务端同事处理多个客户端
 * 本示例作用，服务端监听客户端连接，获取客户端发送的数据
 * 一、编写服务端主启动类，new一个已定义SocketServerListenHandler类，
 * 构造器传入端口号，并启动监听方法listenClientConnect()监听客户端连接。职责是监听连接
 */
@Component
public class SocketServer {

    public void aaa(String fstrDeviceid,String jiaodiaoUrl,String weiboUrl) throws Exception {
        SocketServerListenHandler socketServerListenHandler = new SocketServerListenHandler(3133);
        socketServerListenHandler.listenClientConnect(fstrDeviceid,jiaodiaoUrl,weiboUrl);
    }

//    public static void main(String[] args) throws Exception {
//
//        SocketServerListenHandler socketServerListenHandler = new SocketServerListenHandler(3131);
//        socketServerListenHandler.listenClientConnect(fstrDeviceid,jiaodiaoUrl,weiboUrl);
//    }
}
